**************************************************************************************************************
********************************* All Main Figures******************************************************************
***************************************************************************************************************


*****************Revised Figure 1:  College Expansion by Treatment Status*****************

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-file"

do build-up_college_data.do

drop year_established
gen post=(year>=2009)
gen pre=1-post
gen full_trend=(year-1985) 
gen post_trend=(year-2008) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab year, gen(year_)
for var year_*:gen nightlight_X= nightlight_avg2016*X
for var year_*:gen headpov_X= poverty_headcount *X
for var year_*:gen povgap_X= poverty_gap *X
for var year_*:gen sqpovgap_X= squared_pov_gap *X
for var year_*:gen treat_X= treatment *X
for var year_*:gen pop1823_X= pop1823 *X
tab stateid, gen(state_dum_)
for var state_dum_1- state_dum_35: gen trend_X=X*full_trend


reghdfe college_constructed treat_year_7-treat_year_39 if year>=1985 &  year<2018, absorb(year  districtcode ) cluster(districtcode)


/* Coefficients from the event study
Year	coefficient	se	tvalue	pvalue	lower	upper	trendbreak	time
1985	0						0	0
1986	-0.1597361	0.0717281	-2.23	0.026	-0.3005894	-0.0188827	-0.049	1
1987	-0.0055716	0.061897	-0.09	0.928	-0.1271195	0.1159763	-0.098	2
1988	-0.0289662	0.0642264	-0.45	0.652	-0.1550885	0.0971561	-0.147	3
1989	-0.204563	0.0901328	-2.27	0.024	-0.3815579	-0.0275681	-0.196	4
1990	-0.6071516	0.1140726	-5.32	0	-0.8311573	-0.3831458	-0.245	5
1991	-0.5524116	0.1150593	-4.8	0	-0.778355	-0.3264683	-0.294	6
1992	-0.3464049	0.1049894	-3.3	0.001	-0.5525739	-0.1402359	-0.343	7
1993	-0.4432978	0.1210385	-3.66	0	-0.6809826	-0.205613	-0.392	8
1994	-0.8119891	0.1624319	-5	0	-1.130959	-0.4930196	-0.441	9
1995	-0.3548741	0.1008743	-3.52	0	-0.5529623	-0.1567859	-0.49	10
1996	-0.3239457	0.095692	-3.39	0.001	-0.5118572	-0.1360341	-0.539	11
1997	-0.4280064	0.1405158	-3.05	0.002	-0.7039391	-0.1520738	-0.588	12
1998	-0.4023547	0.1209489	-3.33	0.001	-0.6398637	-0.1648457	-0.637	13
1999	-0.739477	0.1541233	-4.8	0	-1.042131	-0.4368231	-0.686	14
2000	-0.5462097	0.1455724	-3.75	0	-0.8320721	-0.2603473	-0.735	15
2001	-1.041604	0.241177	-4.32	0	-1.515206	-0.5680016	-0.784	16
2002	-0.9991561	0.2419401	-4.13	0	-1.474257	-0.5240552	-0.833	17
2003	-0.8260503	0.3101305	-2.66	0.008	-1.435058	-0.217043	-0.882	18
2004	-1.126967	0.3546354	-3.18	0.002	-1.823369	-0.4305653	-0.931	19
2005	-1.176522	0.3814724	-3.08	0.002	-1.925624	-0.4274198	-0.98	20
2006	-1.077494	0.3438706	-3.13	0.002	-1.752757	-0.4022309	-1.029	21
2007	-0.9039916	0.492379	-1.84	0.067	-1.870882	0.0628993	-1.078	22
2008	-1.323183	0.5450573	-2.43	0.015	-2.393519	-0.2528472	-1.127	23
2009	-1.227297	0.3886799	-3.16	0.002	-1.990552	-0.464041	-0.984	24
2010	-0.7879946	0.3308696	-2.38	0.018	-1.437728	-0.1382617	-0.841	25
2011	-0.2955082	0.2686785	-1.1	0.272	-0.8231155	0.2320992	-0.698	26
2012	-0.3402029	0.2182921	-1.56	0.12	-0.768866	0.0884601	-0.555	27
2013	-0.5174163	0.2593655	-1.99	0.046	-1.026736	-0.008097	-0.412	28
2014	-0.6514092	0.3308948	-1.97	0.049	-1.301192	-0.0016267	-0.269	29
2015	-0.2656777	0.271452	-0.98	0.328	-0.7987314	0.2673759	-0.126	30
2016	0.3729412	0.2683375	1.39	0.165	-0.1539967	0.899879	0.017	31
2017	0.1007463	0.1597952	0.63	0.529	-0.2130455	0.4145381	0.16	32
*/

*Paste this into stata and save
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\Graph-trend-break-college_construction.dta", clear

tsset year
twoway connect coefficient year,||connect trendbreak year, msymbol(diamond) xline(2008) yline(0, lstyle(minor_grid) lcolor(red)) graphregion(color(white)) legend(cols(1)) legend(order(1 "Year-to-year DiD estimates" 2 "Trend-break estimates")) xlabel(1985[5] 2020)
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure 1.png", replace	


*****************Figure 2:  Educational Outtcome by Treatment Status*****************



///////////              Panel A               //////////////////


use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
tab v010, gen (year_dum)
for var year_dum*:gen treatment_X= treatment*X


areg v133 treatment_year_dum2- treatment_year_dum37   i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)

/*Coefficients from the Event Study

Year	coefficient	se	tvalue	pvalue	lower	upper	trendbreak
1965	0						
1966	0.1040925	0.7288773	0.14	0.886	-1.327192	1.535377	-0.0115	1
1967	0.2309275	0.6838449	0.34	0.736	-1.111927	1.573782	-0.023	2
1968	-0.1904529	0.6770329	-0.28	0.779	-1.519931	1.139025	-0.0345	3
1969	-0.1824748	0.7363553	-0.25	0.804	-1.628443	1.263494	-0.046	4
1970	0.3810555	0.7165265	0.53	0.595	-1.025976	1.788087	-0.0575	5
1971	0.0396346	0.7262239	0.05	0.956	-1.386439	1.465708	-0.069	6
1972	-0.2801126	0.6636522	-0.42	0.673	-1.583315	1.02309	-0.0805	7
1973	-0.0074839	0.6868997	-0.01	0.991	-1.356337	1.34137	-0.092	8
1974	-0.2973313	0.7224448	-0.41	0.681	-1.715984	1.121322	-0.1035	9
1975	-0.0876936	0.6948038	-0.13	0.9	-1.452068	1.276681	-0.115	10
1976	0.0662974	0.6805453	0.1	0.922	-1.270078	1.402673	-0.1265	11
1977	0.2841701	0.6588673	0.43	0.666	-1.009637	1.577977	-0.138	12
1978	0.2567785	0.6793193	0.38	0.706	-1.077189	1.590746	-0.1495	13
1979	0.1046672	0.6946163	0.15	0.88	-1.259339	1.468674	-0.161	14
1980	0.0831763	0.6978777	0.12	0.905	-1.287234	1.453587	-0.1725	15
1981	0.3859968	0.7102494	0.54	0.587	-1.008708	1.780702	-0.184	16
1982	0.075842	0.7474282	0.1	0.919	-1.39187	1.543554	-0.1955	17
1983	-0.4394726	0.7091502	-0.62	0.536	-1.832019	0.9530738	-0.207	18
1984	-0.1710263	0.6937842	-0.25	0.805	-1.533399	1.191346	-0.2185	19
1985	-0.5535661	0.7003432	-0.79	0.43	-1.928818	0.8216861	-0.23	20
1986	-0.2091116	0.7098038	-0.29	0.768	-1.602942	1.184718	-0.2415	21
1987	-0.2503347	0.6971856	-0.36	0.72	-1.619387	1.118717	-0.253	22
1988	-0.0063106	0.7219857	-0.01	0.993	-1.424062	1.411441	-0.2645	23
1989	-0.0800011	0.6921877	-0.12	0.908	-1.439239	1.279236	-0.276	24
1990	-0.1614585	0.6983268	-0.23	0.817	-1.532751	1.209834	-0.2875	25
1991	0.1225137	0.6849152	0.18	0.858	-1.222443	1.46747	-0.196	26
1992	0.3636797	0.6894755	0.53	0.598	-0.9902318	1.717591	-0.1045	27
1993	0.3298199	0.691557	0.48	0.634	-1.028179	1.687819	-0.013	28
1994	0.4147381	0.6849779	0.61	0.545	-0.9303417	1.759818	0.0785	29
1995	0.476307	0.6817036	0.7	0.485	-0.862343	1.814957	0.17	30
1996	0.7451018	0.6841437	1.09	0.277	-0.5983398	2.088543	0.2615	31
1997	0.6453385	0.6816593	0.95	0.344	-0.6932246	1.983902	0.353	32
1998	0.8310018	0.6823227	1.22	0.224	-0.5088639	2.170868	0.4445	33
*/

*Plug this into stata and save******

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\Graph-trend-break-years_schooling.dta", clear
tsset year
twoway connect coefficient year,||connect trendbreak year, msymbol(diamond) xline(1990) yline(0, lstyle(minor_grid) lcolor(red)) graphregion(color(white)) legend(cols(1)) legend(order(1 "Year-to-year DiD estimates" 2 "Trend-break estimates")) xlabel(1960[5] 2000)
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure 2- Panel A.png", replace	



//////////////           Panel B: College Enrollment              /////////////////////

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
tab v010, gen (year_dum)
for var year_dum*:gen treatment_X= treatment*X


areg dum4 treatment_year_dum2- treatment_year_dum37   i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)

/*Coefficients from the Event Study

Year	coefficient	se	tvalue	pvalue	lower	upper	trendbreak	
1965	0							0
1966	0.0109939	0.04601	0.24	0.811	-0.0793551	0.1013429	-0.00345	1
1967	0.0223019	0.0412803	0.54	0.589	-0.0587594	0.1033633	-0.0069	2
1968	0.0140697	0.0447735	0.31	0.753	-0.0738513	0.1019907	-0.01035	3
1969	0.0270166	0.0443858	0.61	0.543	-0.060143	0.1141763	-0.0138	4
1970	0.0195659	0.0433511	0.45	0.652	-0.065562	0.1046937	-0.01725	5
1971	-0.0021816	0.0456287	-0.05	0.962	-0.091782	0.0874188	-0.0207	6
1972	0.0141751	0.0422147	0.34	0.737	-0.0687213	0.0970715	-0.02415	7
1973	-0.0173554	0.0469074	-0.37	0.712	-0.1094667	0.074756	-0.0276	8
1974	-0.0237748	0.0448956	-0.53	0.597	-0.1119355	0.0643859	-0.03105	9
1975	0.0093975	0.0415456	0.23	0.821	-0.0721849	0.0909799	-0.0345	10
1976	-0.004796	0.0429338	-0.11	0.911	-0.0891043	0.0795124	-0.03795	11
1977	0.0106214	0.0427592	0.25	0.804	-0.0733442	0.094587	-0.0414	12
1978	0.0060285	0.0429418	0.14	0.888	-0.0782956	0.0903527	-0.04485	13
1979	-0.018764	0.045387	-0.41	0.679	-0.1078897	0.0703617	-0.0483	14
1980	-0.0165338	0.0439006	-0.38	0.707	-0.1027408	0.0696731	-0.05175	15
1981	0.0326197	0.0469647	0.69	0.488	-0.0596041	0.1248436	-0.0552	16
1982	-0.0065528	0.0480331	-0.14	0.892	-0.1008745	0.087769	-0.05865	17
1983	-0.0274509	0.0470809	-0.58	0.56	-0.1199028	0.065001	-0.0621	18
1984	-0.0157825	0.045396	-0.35	0.728	-0.1049259	0.0733609	-0.06555	19
1985	-0.0583688	0.0467352	-1.25	0.212	-0.150142	0.0334043	-0.069	20
1986	-0.0324442	0.047103	-0.69	0.491	-0.1249395	0.0600512	-0.07245	21
1987	-0.0559202	0.045314	-1.23	0.218	-0.1449025	0.0330621	-0.0759	22
1988	-0.0392298	0.0469264	-0.84	0.403	-0.1313784	0.0529187	-0.07935	23
1989	-0.0476311	0.0459237	-1.04	0.3	-0.1378106	0.0425485	-0.0828	24
1990	-0.070398	0.0472524	-1.49	0.137	-0.1631868	0.0223908	-0.08625	25
1991	-0.0563834	0.0459242	-1.23	0.22	-0.146564	0.0337973	-0.0687	26
1992	-0.0532657	0.0454586	-1.17	0.242	-0.142532	0.0360006	-0.05115	27
1993	-0.0577648	0.0448749	-1.29	0.198	-0.1458848	0.0303552	-0.0336	28
1994	-0.0368673	0.044475	-0.83	0.407	-0.1242021	0.0504675	-0.01605	29
1995	-0.0390482	0.0440702	-0.89	0.376	-0.125588	0.0474917	0.0015	30
1996	0.0070492	0.0441365	0.16	0.873	-0.0796209	0.0937192	0.01905	31
1997	0.026434	0.0427844	0.62	0.537	-0.057581	0.1104489	0.0366	32
1998	0.0471594	0.0424904	1.11	0.267	-0.0362782	0.130597	0.05415	33
*/

*Plug this into stata and save******

use "C:\Users\Amzad\Dropbox\College Construction\Graph-trend-break-college_enrollment.dta", clear
tsset year
twoway connect coefficient year,||connect trendbreak year, msymbol(diamond) xline(1990) yline(0, lstyle(minor_grid) lcolor(red)) graphregion(color(white)) legend(cols(1)) legend(order(1 "Year-to-year DiD estimates" 2 "Trend-break estimates")) xlabel(1960[5] 2000)
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure 2- Panel B.png", replace	



**************************************************************************************************************
*********************************Main Tables******************************************************************
***************************************************************************************************************


**************Table 1: Summary Statistics for Our Sample *****************************************

//Panel A: Women’s profile//

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"

sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta

gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.

gen age_at_marriage=int((s308c-v011)/12)
replace age_at_marriage=s309 if age_at_marriage>50 & age_at_marriage<.
replace age_at_marriage=. if age_at_marriage>50
gen child_marriage=1 if age_at_marriage<18
replace child_marriage=0 if age_at_marriage>=18 & age_at_marriage<.
replace child_marriage=0 if  age_at_marriage==.

gen member_workforce=v717
replace member_workforce=1 if v717>=2 & v717<98
replace member_workforce=. if v717==98


sum v133 dum2 dum3 dum4 dum4 finished_college age_at_marriage child_marriage member_workforce if v104==95


//Panel B: Married women’s husbands’ profile//
tab v701, gen(husband_edu_)
for var husband_edu_1 husband_edu_2 husband_edu_3 husband_edu_4: replace X=. if v701==8
gen member_workforce_hus=v705
replace member_workforce_hus=1 if v705>=2 & v705<98
replace member_workforce_hus=. if v705==98
replace v715=. if v715>20

sum v715  husband_edu_2 husband_edu_3 husband_edu_4 member_workforce_hus if v104==95 &v715<21



//Panel C: Mens’ profile//

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NFHS-men.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if mv010>1990 & mv010<.
replace post=0 if mv010<=1990

gen full_trend=(mv010-1965) 
gen post_trend=(mv010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab mv106, gen(dum)
gen finished_college=1 if mv133>=15 & mv133<.
replace finished_college=0 if finished_college==.
gen member_workforce=mv717
replace member_workforce=1 if mv717>=2 & mv717<98
replace member_workforce=. if mv717==98

sum mv133 dum2 dum3 dum4  finished_college member_workforce if mv104==95








***********Table 2:   Effect Of the Grants policy on new colleges and  stock of Colleges *********


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-file"

do build-up_college_data.do

drop year_established
gen post=(year>=2009)
gen pre=1-post
gen full_trend=(year-1980) 
gen post_trend=(year-2008) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab year, gen(year_)
for var year_*:gen nightlight_X= nightlight_avg2016*X
for var year_*:gen headpov_X= poverty_headcount *X
for var year_*:gen povgap_X= poverty_gap *X
for var year_*:gen sqpovgap_X= squared_pov_gap *X
for var year_*:gen treat_X= treatment *X
for var year_*:gen pop1823_X= pop1823 *X
for var year_*:gen DistPop_All_X= DistPop_All_ *X
tab stateid, gen(state_dum_)
for var state_dum_1- state_dum_35: gen trend_X=X*full_trend


//Panel A//

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post     i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post nightlight_year_*    i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')



areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post povgap_year_*  i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post sqpovgap_year_*   i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post headpov_year_*  i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post trend_state_dum_*  i.year if year>=1985 & year<=2017 , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')






*********Table III: Effect of the Grants Policy on Educational Attainment of Girls***************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
gen num_years_in_college=v133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.

//Panel A: With socio-economic controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 3: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

//Panel B: Without socio-economic controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 3: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}




******************Table 4: Effect of the Grants Policy on Educational Attainment of Girls (Full Sample)****************************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
gen num_years_in_college=v133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.

//Panel A: Full sample: with controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998  , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 4: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

//Panel B: Full sample: with controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998  , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 4: Panel B.xls.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}



*********Table 5: Effect of the Grants Policy on Educational Attainment of Men***************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NFHS-men.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if mv010>1990 & mv010<.
replace post=0 if mv010<=1990

gen full_trend=(mv010-1965) 
gen post_trend=(mv010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab mv106, gen(dum)
gen finished_college=1 if mv133>=15 & mv133<.
replace finished_college=0 if finished_college==.
gen num_years_in_college=mv133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.

//Panel A: With Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist mv133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv190  i.mv025 i.mv131 mv136 i.mv010 if mv010<=1998 & mv104==95  , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 5: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

//Panel B: Without Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist mv133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.mv010 if mv010<=1998 & mv104==95  , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 5: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}




***********Table 6: Effect of the Grants Policy on Educational Attainment of Girls by Region***********8
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"

sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta

gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.


//Panel A: With Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==2 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

reg v133  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==1 & v104==95 
estimate store school_urban

reg v133  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==2 & v104==95 
estimate store school_rural
suest school_urban school_rural, cluster(sdistri)

test [school_rural_mean]c.full_trend#c.treatment+[school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.full_trend#c.treatment-[school_urban_mean]c.post_trend#c.treatment= 0
//chow test:p-value: 0.1862
test [school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.post_trend#c.treatment= 0
//Chow test: p-value: 0.0406


areg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')
areg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==2 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

reg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==1 & v104==95 
estimate store school_urban

reg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==2 & v104==95 
estimate store school_rural
suest school_urban school_rural, cluster(sdistri)

test [school_rural_mean]c.full_trend#c.treatment+[school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.full_trend#c.treatment-[school_urban_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.1247
test [school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.0769

areg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')
areg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v025==2 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

reg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==1 & v104==95 
estimate store school_urban

reg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v025==2  & v104==95
estimate store school_rural
suest school_urban school_rural, cluster(sdistri)

test [school_rural_mean]c.full_trend#c.treatment+[school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.full_trend#c.treatment-[school_urban_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.1227
test [school_rural_mean]c.post_trend#c.treatment -[school_urban_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.0695

//Panel B: Without Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==2 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')
areg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==2 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==1 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')
areg finished_college  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v025==2 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 6: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')




************Table 7: Effect of the Grants Policy on College Enrollment of Girls by Wealth*************************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)



//Panel A: With Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach i of numlist 1 2 3 4 5 { //vars

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v190==`i' & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 7: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}


////////////////////// Chow Test///////////////////////
//Poorest vs richest///
reg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v190==1 & v104==95 
estimate store school_poorest

reg dum4  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190   i.v131 v136 i.v010 i.sdistri if v010<=1998 & v190==5 & v104==95 
estimate store school_richest
suest school_poorest school_richest, cluster(sdistri)

test [school_richest_mean]c.full_trend#c.treatment+[school_richest_mean]c.post_trend#c.treatment -[school_poorest_mean]c.full_trend#c.treatment-[school_poorest_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.3980
test [school_richest_mean]c.post_trend#c.treatment -[school_poorest_mean]c.post_trend#c.treatment= 0
//chow test p-value:0.4799


//Panel B: Without Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach i of numlist 1 2 3 4 5 { //vars

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v190==`i' & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 7: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}





***********Table 8: Spillover  Analysis:  Effect  of  the  Grants  Policy  on  Educational  Attainment  ofGirls*************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
gen control_neighbor=1 if treatment_neighbor==0
replace control_neighbor=0 if treatment_neighbor==.
replace control_neighbor=0 if control_neighbor==.


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college { //vars


areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post c.full_trend#c.control_neighbor c.post_trend#c.control_neighbor c.control_neighbor#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

test c.full_trend#c.control_neighbor =-(c.post_trend#c.control_neighbor)
local fstat3=r(F)
local fsig3=r(p)

test c.full_trend#c.control_neighbor c.post_trend#c.control_neighbor
local fstat4=r(F)
local fsig4=r(p)


outreg2 using "Table 8.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2', "F-stat 3", `fstat3', "Sig. level", `fsig3', "F-stat 4", `fstat4', "Sig. level", `fsig4') `append'
local append append
}



************Table 9: Effect of the Grants Policy on Female Labor Force Participation (22 years and older)***********
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
gen member_workforce=v717
replace member_workforce=1 if v717>=2 & v717<98
replace member_workforce=. if v717==98


gen agricultural_workforce=1 if v717==5
replace agricultural_workforce=0 if v717!=5
replace agricultural_workforce=. if v717==.
replace agricultural_workforce=. if v717==98

gen non_agri_workforce=0 if v717==5| v717==0
replace non_agri_workforce=1 if non_agri_workforce==.
replace non_agri_workforce=. if v717==.
replace non_agri_workforce=. if v717==98

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

//Panel A: With Socio-economic Controls//
areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel A.xls", replace  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95 & v025==1 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel A.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95 & v025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel A.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


//Panel B: Without Socio-economic Controls//
areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v010 i.v701 if v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel B.xls", replace  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 i.v701 if v104==95 & v025==1 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel B.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 i.v701 if v104==95 & v025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 9: Panel B.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'



***********Table 10: Effect of the Grants Policy on Husband’s Education and Employment*************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab v701, gen(husband_edu_)
for var husband_edu_1 husband_edu_2 husband_edu_3 husband_edu_4: replace X=. if v701==8
gen member_workforce_hus=v705
replace member_workforce_hus=1 if v705>=2 & v705<98
replace member_workforce_hus=. if v705==98


gen agricultural_workforce_hus=1 if v705==5
replace agricultural_workforce_hus=0 if v705!=5
replace agricultural_workforce_hus=. if v705==.
replace agricultural_workforce_hus=. if v705==98

gen non_agri_workforce_hus=0 if v705==5| v705==0
replace non_agri_workforce_hus=1 if non_agri_workforce_hus==.
replace non_agri_workforce_hus=. if v705==.
replace non_agri_workforce_hus=. if v705==98


//Panel A: All women//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace

foreach var of varlist v715 husband_edu_4  { //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v715<21 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 10: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

foreach var of varlist  member_workforce_hus agricultural_workforce_hus non_agri_workforce_hus { //vars

areg `var'  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 10: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}


//Panel B: Women with at least a secondary education//

tab v106, gen(dum)

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace

foreach var of varlist v715 husband_edu_4  { //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v715<21 & (dum4==1|dum3==1) & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 10: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

foreach var of varlist  member_workforce_hus agricultural_workforce_hus non_agri_workforce_hus { //vars

areg `var'  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95 & (dum4==1|dum3==1) , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 10: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}




************Table 11: Effect of the Grants Policy on Child Marriage**********
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

gen age_at_marriage=int((s308c-v011)/12)
replace age_at_marriage=s309 if age_at_marriage>50 & age_at_marriage<.
replace age_at_marriage=. if age_at_marriage>50
gen child_marriage=1 if age_at_marriage<18
replace child_marriage=0 if age_at_marriage>=18 & age_at_marriage<.
replace child_marriage=0 if  age_at_marriage==.

//Panel A: With Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel A.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95 & v025==1  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'
areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95 & v025==1, absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95 & v025==2  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v104==95 & v025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 11: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'



//Panel B: Without Controls//

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel B.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95 & v025==1  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'
areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95 & v025==1, absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg age_at_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95 & v025==2  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table 11: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg child_marriage  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v010 if v104==95 & v025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table 11: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


**************************************************************************************************************
********************************* All Appendix Figures******************************************************************
***************************************************************************************************************


************************Figure A.3:  2001 GER and Growth in Colleges****************
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\college_institutions_2018.dta", clear
merge m:1 district_code using split_district.dta
drop if _merge==2
drop _merge
merge m:1 districtcode using treatment.dta
drop _merge
merge m:1 districtcode using ger_640_districts.dta
tab management_id, gen(management_)
bys districtcode year_of_establishment:egen college_central_gov=sum( management_1)
bys districtcode year_of_establishment:egen college_state_gov=sum( management_2)
bys districtcode year_of_establishment:egen college_local_body=sum( management_3)
bys districtcode year_of_establishment:egen college_university=sum( management_4)
bys districtcode year_of_establishment:egen college_private_aided=sum( management_5)
bys districtcode year_of_establishment:egen college_private_nonaided=sum( management_6)
bys districtcode year_of_establishment:keep if _n==1
xtset districtcode year_of_establishment
sum college_central_gov- college_private_nonaided
egen college_constructed=rsum( college_central_gov- college_private_nonaided)
collapse (sum) college_central_gov college_state_gov college_local_body college_university college_private_aided college_private_nonaided college_constructed (  first) ger state_code district_code, by( districtcode year_of_establishment)
keep districtcode year_of_establishment college_constructed ger
drop if year_of_establishment==.
reshape wide college_constructed, i( districtcode) j( year_of_establishment)
egen total_collge_1980=rsum( college_constructed1302- college_constructed1980)
egen total_collge_1981=rsum( college_constructed1302- college_constructed1981)
egen total_collge_1982=rsum( college_constructed1302- college_constructed1982)
egen total_collge_1983=rsum( college_constructed1302- college_constructed1983)
egen total_collge_1984=rsum( college_constructed1302- college_constructed1984)
egen total_collge_1985=rsum( college_constructed1302- college_constructed1985)
egen total_collge_1986=rsum( college_constructed1302- college_constructed1986)
egen total_collge_1987=rsum( college_constructed1302- college_constructed1987)
egen total_collge_1988=rsum( college_constructed1302- college_constructed1988)
egen total_collge_1989=rsum( college_constructed1302- college_constructed1989)
egen total_collge_1990=rsum( college_constructed1302- college_constructed1990)
egen total_collge_1991=rsum( college_constructed1302- college_constructed1991)
egen total_collge_1992=rsum( college_constructed1302- college_constructed1992)
egen total_collge_1993=rsum( college_constructed1302- college_constructed1993)
egen total_collge_1994=rsum( college_constructed1302- college_constructed1994)
egen total_collge_1995=rsum( college_constructed1302- college_constructed1995)
egen total_collge_1996=rsum( college_constructed1302- college_constructed1996)
egen total_collge_1997=rsum( college_constructed1302- college_constructed1997)
egen total_collge_1998=rsum( college_constructed1302- college_constructed1998)
egen total_collge_1999=rsum( college_constructed1302- college_constructed1999)
egen total_collge_2000=rsum( college_constructed1302- college_constructed2000)
egen total_collge_2001=rsum( college_constructed1302- college_constructed2001)
egen total_collge_2002=rsum( college_constructed1302- college_constructed2002)
egen total_collge_2003=rsum( college_constructed1302- college_constructed2003)
egen total_collge_2004=rsum( college_constructed1302- college_constructed2004)
egen total_collge_2005=rsum( college_constructed1302- college_constructed2005)
egen total_collge_2006=rsum( college_constructed1302- college_constructed2006)
egen total_collge_2007=rsum( college_constructed1302- college_constructed2007)
egen total_collge_2008=rsum( college_constructed1302- college_constructed2008)
egen total_collge_2009=rsum( college_constructed1302- college_constructed2009)
egen total_collge_2010=rsum( college_constructed1302- college_constructed2010)
egen total_collge_2011=rsum( college_constructed1302- college_constructed2011)
egen total_collge_2012=rsum( college_constructed1302- college_constructed2012)
egen total_collge_2013=rsum( college_constructed1302- college_constructed2013)
egen total_collge_2014=rsum( college_constructed1302- college_constructed2014)
egen total_collge_2015=rsum( college_constructed1302- college_constructed2015)
egen total_collge_2016=rsum( college_constructed1302- college_constructed2016)
egen total_collge_2017=rsum( college_constructed1302- college_constructed2017)
egen total_collge_2018=rsum( college_constructed1302- college_constructed2018)

gen growth_o8_18= ((total_collge_2018- total_collge_2008)/ total_collge_2008)*100
cmogram growth_o8_18 ger if growth_o8_18<200 , scatter lfit cutpoint(12.4) graphopts(ytitle("Growth rate (%)") xtitle("GER in 2001"))

graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure A3.png", replace	


************Figure A.4: Difference in the Total Stock of Colleges between the Treated and Control Districts******

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-file"

do build-up_college_data.do


table year, c(mean total_college)
collapse (sum) total_college, by(year treatment)
drop if treatment==.
reshape wide total_college, i( year) j( treatment)
tsset year
gen x= total_college1- total_college0
keep if year>=1985
twoway connect x year, xline(2009) graphregion(color(white)) ytitle("Difference in total number of colleges between treated & control districts", size(small)) xlabel(1985[5] 2020)
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure A4.png", replace	





***********Figure A.6: Event Study of the Effect of Grant Policy on Out-Migration **************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\ger_593_districts.dta", clear
sort id
save,replace
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\36151-0011-Data.dta", clear
gen id= (STATEID*100)+ DISTID
sort id 
merge id using ger_593_districts.dta
keep if _merge==3
drop _merge
merge 1:1 STATEID DISTID PSUID HHID HHSPLITID PERSONID using round1IND.dta
keep if _merge==3
drop _merge


gen v010=2005-TK1RO5
label var v010 "Year of Birth"
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
drop if TK1RO3==1
gen migration=( TH26!=.)
tab TH26, gen(reason_migration_)
drop if v010<1965
for var reason_migration_1- reason_migration_5:replace X=0 if X==.


tab v010, gen (year_dum)
for var year_dum*:gen treatment_X= treatment*X


//Panel A: Migration for education//
 preserve
gen timeToTreat = v010 -1991
   replace timeToTreat = . if treatment==0	
drop if v010>1994
eventdd  reason_migration_3  i.v010 i.id if v010<=1994 ,    timevar(timeToTreat) ci(rcap) cluster(id) graph_op(xtitle("Year of birth")/*
	*/scheme(s1color) xlabel(-26 "1965" -21 "1970" -16 "1975" -11 "1980" -6 "1985" -1 "1990" 5 "1995"))
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure A6- Panel A.png", replace	
 restore



//Panel B: Migration for work//
preserve
gen timeToTreat = v010 -1991
   replace timeToTreat = . if treatment==0	
drop if v010>1994
eventdd  reason_migration_2  i.v010 i.id if v010<=1994 ,    timevar(timeToTreat) ci(rcap) cluster(id) graph_op(xtitle("Year of birth")/*
	*/scheme(s1color) xlabel(-26 "1965" -21 "1970" -16 "1975" -11 "1980" -6 "1985" -1 "1990" 5 "1995"))
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure A6- Panel B.png", replace	
 restore




 
 
 ************Figure A.7: Female Labor Market Participation by Treatment Status*****************
 
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
gen member_workforce=v717
replace member_workforce=1 if v717>=2 & v717<98
replace member_workforce=. if v717==98


gen agricultural_workforce=1 if v717==5
replace agricultural_workforce=0 if v717!=5
replace agricultural_workforce=. if v717==.
replace agricultural_workforce=. if v717==98

gen non_agri_workforce=0 if v717==5| v717==0
replace non_agri_workforce=1 if non_agri_workforce==.
replace non_agri_workforce=. if v717==.
replace non_agri_workforce=. if v717==98




tab v010, gen (year_dum)
for var year_dum*:gen treatment_X= treatment*X


areg member_workforce treatment_year_dum2- treatment_year_dum37   i.v190  i.v140 i.v131 v136 i.v010 i.v701 if v104==95  , absorb(sdistri) cluster(sdistri)


/*
Year	coefficient	se	tvalue	pvalue	lower	upper	trendbreak	time
1965	0						0	0
1966	-0.052303	0.230907	-0.23	0.821	-0.5058406	0.4012345	0.00036	1
1967	-0.0402698	0.2112232	-0.19	0.849	-0.4551452	0.3746057	0.00072	2
1968	-0.1003148	0.2165195	-0.46	0.643	-0.5255931	0.3249635	0.00108	3
1969	-0.0517504	0.2108893	-0.25	0.806	-0.46597	0.3624691	0.00144	4
1970	0.0647212	0.2063287	0.31	0.754	-0.3405407	0.4699831	0.0018	5
1971	-0.034778	0.2114491	-0.16	0.869	-0.4500971	0.3805411	0.00216	6
1972	-0.1506348	0.2136703	-0.7	0.481	-0.5703167	0.2690472	0.00252	7
1973	-0.0221514	0.2075885	-0.11	0.915	-0.4298877	0.3855849	0.00288	8
1974	-0.082184	0.2151054	-0.38	0.703	-0.5046846	0.3403167	0.00324	9
1975	0.0635092	0.2019841	0.31	0.753	-0.3332193	0.4602376	0.0036	10
1976	-0.1355741	0.1999965	-0.68	0.498	-0.5283986	0.2572505	0.00396	11
1977	-0.0364681	0.2078647	-0.18	0.861	-0.4447469	0.3718108	0.00432	12
1978	-0.1384938	0.1984709	-0.7	0.486	-0.5283217	0.2513341	0.00468	13
1979	-0.0514368	0.2038988	-0.25	0.801	-0.451926	0.3490525	0.00504	14
1980	-0.0497875	0.1989044	-0.25	0.802	-0.4404669	0.3408919	0.0054	15
1981	-0.0590273	0.2091272	-0.28	0.778	-0.4697858	0.3517312	0.00576	16
1982	-0.0644004	0.2157739	-0.3	0.765	-0.4882141	0.3594132	0.00612	17
1983	-0.077133	0.2037265	-0.38	0.705	-0.4772838	0.3230179	0.00648	18
1984	0.0868604	0.2116015	0.41	0.682	-0.3287581	0.5024789	0.00684	19
1985	-0.1011887	0.2085566	-0.49	0.628	-0.5108266	0.3084492	0.0072	20
1986	-0.0091855	0.2113545	-0.04	0.965	-0.424319	0.4059479	0.00756	21
1987	-0.0925839	0.2182942	-0.42	0.672	-0.5213479	0.3361802	0.00792	22
1988	0.1021212	0.2088777	0.49	0.625	-0.3081474	0.5123897	0.00828	23
1989	-0.02528	0.20359	-0.12	0.901	-0.4251626	0.3746027	0.00864	24
1990	-0.0813337	0.2139891	-0.38	0.704	-0.5016419	0.3389744	0.009	25
1991	0.0153026	0.2015843	0.08	0.94	-0.3806405	0.4112457	0.03906	26
1992	-0.0849132	0.2073534	-0.41	0.682	-0.4921877	0.3223613	0.06912	27
1993	0.1105004	0.2050825	0.54	0.59	-0.2923137	0.5133144	0.09918	28
1994	-0.0212957	0.2099828	-0.1	0.919	-0.4337348	0.3911433	0.12924	29
1995	0.1573623	0.2070043	0.76	0.447	-0.2492265	0.5639512	0.1593	30
1996	0.0886555	0.2101158	0.42	0.673	-0.3240448	0.5013559	0.18936	31
1997	0.1670009	0.2225371	0.75	0.453	-0.2700968	0.6040987	0.21942	32
1998	0.1078716	0.2274226	0.47	0.635	-0.338822	0.5545651	0.24948	33
*/

use "C:\Users\Amzad\Dropbox\College Construction\Graph-trend-break-female_lab_market.dta",clear
tsset year
twoway connect coefficient year,||connect trendbreak year, msymbol(diamond) xline(1990) yline(0, lstyle(minor_grid) lcolor(red)) graphregion(color(white)) legend(cols(1)) legend(order(1 "Year-to-year DiD estimates" 2 "Trend-break estimates")) xlabel(1965[5] 2000)
graph export "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Figures\Figure A7.png", replace	



**************************************************************************************************************
********************************* All Appendix Tables******************************************************************
***************************************************************************************************************


************ Table A.1: Covariate Balance between Treatment and Control Districts*************
//Panel A: Women’s profile//

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"

sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta

gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.

gen age_at_marriage=int((s308c-v011)/12)
replace age_at_marriage=s309 if age_at_marriage>50 & age_at_marriage<.
replace age_at_marriage=. if age_at_marriage>50
gen child_marriage=1 if age_at_marriage<18
replace child_marriage=0 if age_at_marriage>=18 & age_at_marriage<.


gen member_workforce=v717
replace member_workforce=1 if v717>=2 & v717<98
replace member_workforce=. if v717==98
gen agricultural_workforce=1 if v717==5
replace agricultural_workforce=0 if v717!=5
replace agricultural_workforce=. if v717==.
replace agricultural_workforce=. if v717==98

gen non_agri_workforce=0 if v717==5| v717==0
replace non_agri_workforce=1 if non_agri_workforce==.
replace non_agri_workforce=. if v717==.
replace non_agri_workforce=. if v717==98


sum v133 dum2 dum3 dum4 dum4 finished_college age_at_marriage child_marriage member_workforce if v104==95
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace

foreach var of varlist v133 dum2 dum3 dum4  finished_college age_at_marriage child_marriage member_workforce agricultural_workforce non_agri_workforce  { //vars

areg `var' treatment  if v010<=1990 & v104==95 , absorb(v010) cluster(sdistri)

outreg2 using "Table A1-Panel A.xls",   `append'

local append append
}



// Married women’s husbands’ profile//
tab v701, gen(husband_edu_)
for var husband_edu_1 husband_edu_2 husband_edu_3 husband_edu_4: replace X=. if v701==8
gen member_workforce_hus=v705
replace member_workforce_hus=1 if v705>=2 & v705<98
replace member_workforce_hus=. if v705==98
replace v715=. if v715>20
gen agricultural_workforce_hus=1 if v705==5
replace agricultural_workforce_hus=0 if v705!=5
replace agricultural_workforce_hus=. if v705==.
replace agricultural_workforce_hus=. if v705==98

gen non_agri_workforce_hus=0 if v705==5| v705==0
replace non_agri_workforce_hus=1 if non_agri_workforce_hus==.
replace non_agri_workforce_hus=. if v705==.
replace non_agri_workforce_hus=. if v705==98

foreach var of varlist v715  husband_edu_2 husband_edu_3 husband_edu_4 member_workforce_hus agricultural_workforce_hus non_agri_workforce_hus { //vars

areg `var' treatment  if v010<=1990 & v104==95 , absorb(v010) cluster(sdistri)

outreg2 using "Table A1-Panel A.xls",   `append'

local append append
}


//Panel B: District-level Information from 2001 Census//
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\census_2001_with_treatment.dta", clear


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace

foreach var of varlist  fm_ratio percent_sc percent_lit ger percent_work { //vars

reg `var' treatment   ,  cluster(sdistri)

outreg2 using "Table A1-Panel B.xls",   `append'

local append append
}



********Appendix Table A.2:  College Expansion as a Function of 2001 GER***********
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-File"

do build-up_college_data.do

drop year_established
gen post=(year>=2009)
gen pre=1-post
gen full_trend=(year-1985) 
gen post_trend=(year-2008) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab year, gen(year_)
for var year_*:gen nightlight_X= nightlight_avg2016*X
for var year_*:gen headpov_X= poverty_headcount *X
for var year_*:gen povgap_X= poverty_gap *X
for var year_*:gen sqpovgap_X= squared_pov_gap *X
for var year_*:gen treat_X= treatment *X
for var year_*:gen pop1823_X= pop1823 *X
for var year_*:gen DistPop_All_X= DistPop_All_ *X
tab stateid, gen(state_dum_)
for var state_dum_1- state_dum_35: gen trend_X=X*full_trend
gen year_established=year





cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg college_constructed c.full_trend#c.ger c.post_trend#c.ger c.ger#c.post   i.year_established if year_established>=1985 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.ger=-(c.post_trend#c.ger)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.ger c.post_trend#c.ger
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A2.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.ger c.post_trend#c.ger c.ger#c.post nightlight_year_*   i.year_established if year_established>=1985 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.ger=-(c.post_trend#c.ger)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.ger c.post_trend#c.ger
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')



areg college_constructed c.full_trend#c.ger c.post_trend#c.ger c.ger#c.post povgap_year_*    i.year_established if year_established>=1985 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.ger=-(c.post_trend#c.ger)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.ger c.post_trend#c.ger
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.ger c.post_trend#c.ger c.ger#c.post sqpovgap_year_*   i.year_established if year_established>=1985 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.ger=-(c.post_trend#c.ger)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.ger c.post_trend#c.ger
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


areg college_constructed c.full_trend#c.ger c.post_trend#c.ger c.ger#c.post  headpov_year_*   i.year_established if year_established>=1985 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.ger=-(c.post_trend#c.ger)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.ger c.post_trend#c.ger
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A2.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')




********Table A.3: RDD Estimates of the Effect of the Grants Policy on Cumulative Colleges per 100,000 Population************************
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-File"

do build-up_college_data.do


//Panel A//

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

gen margin=12.4-ger

gen marginsq=margin^2
gen margincube=margin^3

//Linear Regression Model//

local append replace
foreach y of numlist 2008/2015 { //year
rdrobust college_percapita margin if year==`y', p(1)
local bwidth=e(h_l)
kernel margin, value(0) bw(`e(h_l)') out(kcf)

xi:reg college_percapita treatment margin  if abs(margin)<=`e(h_l)' & year==`y' [pw=kcf] ,  cluster(districtcode)
sum college_percapita if ger>=12.4  & year==`y'

outreg2 using "Table A3: Panel A.xls", bdec(3) sdec(3) excel nonote   ///
		addstat("Control Mean", `r(mean)', "Bandwidth", `bwidth')  `append'
drop kcf
local append append
}

local append replace
foreach y of numlist 2008/2015 { //year
rdrobust college_percapita margin if year==`y', p(2)
local bwidth=e(h_l)
kernel margin, value(0) bw(`e(h_l)') out(kcf)

xi:reg college_percapita treatment margin marginsq  if abs(margin)<=`e(h_l)' & year==`y' [pw=kcf] ,  cluster(districtcode)
sum college_percapita if ger>=12.4  & year==`y'

outreg2 using "Table A3: Panel B.xls", bdec(3) sdec(3) excel nonote   ///
		addstat("Control Mean", `r(mean)', "Bandwidth", `bwidth')  `append'
drop kcf
local append append
}

local append replace
foreach y of numlist 2008/2015 { //year
rdrobust college_percapita margin if year==`y', p(3)
local bwidth=e(h_l)
kernel margin, value(0) bw(`e(h_l)') out(kcf)

xi:reg college_percapita treatment margin marginsq margincube  if abs(margin)<=`e(h_l)' & year==`y' [pw=kcf] ,  cluster(districtcode)
sum college_percapita if ger>=12.4  & year==`y'

outreg2 using "Table A3: Panel C.xls", bdec(3) sdec(3) excel nonote   ///
		addstat("Control Mean", `r(mean)', "Bandwidth", `bwidth')  `append'
drop kcf
local append append
}



*****************Table A.4: Effect of the Grants Policy on Number of Years of Schooling *****************************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"


gen num_years_in_college=v133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.


areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A4.xls", replace  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95 & v106<3, absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A4.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg num_years_in_college c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A4.xls", append  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'



*********Table A.6: Effect of the Grants Policy on Educational Attainment of Men (Full Sample)***************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NFHS-men.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if mv010>1990 & mv010<.
replace post=0 if mv010<=1990

gen full_trend=(mv010-1965) 
gen post_trend=(mv010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab mv106, gen(dum)
gen finished_college=1 if mv133>=15 & mv133<.
replace finished_college=0 if finished_college==.
gen num_years_in_college=mv133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.

//Panel A: With Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist mv133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv190  i.mv025 i.mv131 mv136 i.mv010 if mv010<=1998   , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A6: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

//Panel B: Without Socio-economic Controls//
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist mv133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.mv010 if mv010<=1998  , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A6: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}



**Appendix Table A.7:  Effect of the Grants Policy on Years of Schooling with Different Controls (Without HH controls)***************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab v010, gen(yeardum)
for var yeardum*: gen treatment_X=treatment*X
for var yeardum*:gen nightlight_X= nlight_avg1997*X
for var yeardum*:gen headpov_X= poverty_headcount *X
for var yeardum*:gen povgap_X= poverty_gap *X
for var yeardum*:gen sqpovgap_X= squared_pov_gap *X



cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

//Panel A: Years of Schooling//

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)

local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel A.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post nightlight_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)

local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post headpov_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)

local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post povgap_yeardum*  i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)

local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg v133 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post sqpovgap_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


///Panel B: College Enrollment//
tab v106, gen(dum)


areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel B.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post nightlight_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post headpov_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post povgap_yeardum*  i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg dum4 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post sqpovgap_yeardum*  i.v010 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A7: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


********Table A.8:   Effect Of the Grants policy:  Sensitivity to different Sample Period***
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Do-file"

do build-up_college_data.do

drop year_established
gen post=(year>=2009)
gen pre=1-post
gen full_trend=(year-1985) 
gen post_trend=(year-2008) if post==1
for var full_trend post_trend:replace X=0 if X==.
gen year_established=year


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.year_established if year_established>=1980 & year_established<=2017   , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A8.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.year_established if year_established>=1985 & year_established<=2017   , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A8.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.year_established if year_established>=1990 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A8.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg college_constructed c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.year_established if year_established>=1995 & year_established<=2017  , absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A8.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')




******************Table A.9:  Changes in Political Affiliation by Treatment Status**************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\ger_640_districts.dta", clear
sort districtcode
save,replace
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\aff_dist_level.dta"
sort districtcode
save,replace
sort districtcode
save,replace
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
merge districtcode using ger_640_districts.dta
gen post=0 if year<=2008
replace post=1 if post==.

gen full_trend=(year-2004) 
gen post_trend=(year-2008) if post==1
for var full_trend post_trend:replace X=0 if X==.




egen idcode=group(districtcode)
quietly tab idcode,gen(idcode_dum)
quietly for num 1/640: replace idcode_dumX = idcode_dumX*full_trend

tab statecode, gen(state_dum_)
for var state_dum_1- state_dum_30: gen trend_X=X*full_trend


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg aff_ruling_alliance c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.year, absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A9.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


areg aff_ruling_alliance c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post trend_state_dum_*     i.year, absorb(districtcode) cluster(districtcode)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A9.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'



******************Table A.10:  Changes in Political Affiliation by Treatment Status**************



//Column 1 & 2//
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\ger_640_districts.dta", clear
sort districtcode
save,replace
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\aff_dist_level.dta"
sort districtcode
save,replace
sort districtcode
save,replace
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
merge districtcode using ger_640_districts.dta
gen post=0 if year<=2008
replace post=1 if post==.
egen idcode=group(districtcode)
quietly tab idcode,gen(idcode_dum)
quietly for num 1/640: replace idcode_dumX = idcode_dumX*(year-2005)
tab statecode, gen(state_dum_)
for var state_dum_1- state_dum_30: gen trend_X=X*(year-2005)


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg aff_ruling_alliance c.treatment#c.post treatment post idcode_dum* , absorb(districtcode) cluster(districtcode)
outreg2 using "Table A10.xls", replace
areg aff_ruling_alliance c.treatment#c.post treatment post trend_state_dum_*  , absorb(districtcode) cluster(districtcode)
outreg2 using "Table A10.xls", append



//Column 3 & 4//
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\ger_593_districts.dta", clear
sort id
save,replace
 cd "C:\Users\Amzad\Dropbox\College Construction"
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\migration.dta"
sort id
save,replace
merge id using ger_593_districts.dta

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg migration c.treatment#c.post treatment post , absorb(hh_id) cluster(id)
outreg2 using "Table A10.xls", append
areg migration c.treatment#c.post treatment post , absorb(id) cluster(id)
outreg2 using "Table A10.xls", append


****************Table A.11: Effect of the Grants Policy on Out-Migration ******************************************************************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\ger_593_districts.dta", clear
sort id
save,replace
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\36151-0011-Data.dta", clear
gen id= (STATEID*100)+ DISTID
sort id 
merge id using ger_593_districts.dta
keep if _merge==3
drop _merge
merge 1:1 STATEID DISTID PSUID HHID HHSPLITID PERSONID using round1IND.dta
keep if _merge==3
drop _merge


gen v010=2005-TK1RO5
label var v010 "Year of Birth"
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
drop if TK1RO3==1
gen migration=( TH26!=.)
tab TH26, gen(reason_migration_)
drop if v010<1965
for var reason_migration_1- reason_migration_5:replace X=0 if X==.


tab v010, gen (year_dum)
for var year_dum*:gen treatment_X= treatment*X






areg reason_migration_2 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1994   , absorb(id) cluster(id)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A11.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')

areg reason_migration_3 c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1994   , absorb(id) cluster(id)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A11.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2')


***********Table A.12: Spillover  Analysis:  Effect  of  the  Grants  Policy  on  Educational  Attainment  ofGirls*************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.

gen control_neighbor=1 if treatment_neighbor==0
replace control_neighbor=0 if treatment_neighbor==.
replace control_neighbor=0 if control_neighbor==.


cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college { //vars


areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post c.full_trend#c.control_neighbor c.post_trend#c.control_neighbor c.control_neighbor#c.post   i.v010 i.v190 if v010<=1998 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

test c.full_trend#c.control_neighbor =-(c.post_trend#c.control_neighbor)
local fstat3=r(F)
local fsig3=r(p)

test c.full_trend#c.control_neighbor c.post_trend#c.control_neighbor
local fstat4=r(F)
local fsig4=r(p)


outreg2 using "Table A12.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2', "F-stat 3", `fstat3', "Sig. level", `fsig3', "F-stat 4", `fstat4', "Sig. level", `fsig4') `append'
local append append
}


***********Table A13: Effect of the Grants Policy on Husband’s Education and Employment*************

use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab v701, gen(husband_edu_)
for var husband_edu_1 husband_edu_2 husband_edu_3 husband_edu_4: replace X=. if v701==8
gen member_workforce_hus=v705
replace member_workforce_hus=1 if v705>=2 & v705<98
replace member_workforce_hus=. if v705==98


gen agricultural_workforce_hus=1 if v705==5
replace agricultural_workforce_hus=0 if v705!=5
replace agricultural_workforce_hus=. if v705==.
replace agricultural_workforce_hus=. if v705==98

gen non_agri_workforce_hus=0 if v705==5| v705==0
replace non_agri_workforce_hus=1 if non_agri_workforce_hus==.
replace non_agri_workforce_hus=. if v705==.
replace non_agri_workforce_hus=. if v705==98

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace


//Panel A: All women//
foreach var of varlist v715 husband_edu_4  { //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v715<21 & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A13: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

foreach var of varlist  member_workforce_hus agricultural_workforce_hus non_agri_workforce_hus { //vars

areg `var'  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 i.v701 if v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A13: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}


//Panel B: Women with at least a secondary education

tab v106, gen(dum)

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

local append replace

foreach var of varlist v715 husband_edu_4  { //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post i.v190  i.v010   if v010<=1998 & v715<21 & (dum4==1|dum3==1) & v104==95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A13: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}


foreach var of varlist  member_workforce_hus agricultural_workforce_hus non_agri_workforce_hus { //vars

areg `var'  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 i.v701 if v104==95 & (dum4==1|dum3==1) , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A13: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}



************Table A14: Effect of the Grants Policy on Men's Labor Force Participation***********
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NFHS-men.dta", clear
gen post=1 if mv010>1990 & mv010<.
replace post=0 if mv010<=1990

gen full_trend=(mv010-1965) 
gen post_trend=(mv010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

tab mv106, gen(dum)
gen finished_college=1 if mv133>=15 & mv133<.
replace finished_college=0 if finished_college==.
gen member_workforce=mv717
replace member_workforce=1 if mv717>=2 & mv717<98
replace member_workforce=. if mv717==98


gen agricultural_workforce=1 if mv717==5
replace agricultural_workforce=0 if mv717!=5
replace agricultural_workforce=. if mv717==.
replace agricultural_workforce=. if mv717==98

gen non_agri_workforce=0 if mv717==5| mv717==0
replace non_agri_workforce=1 if non_agri_workforce==.
replace non_agri_workforce=. if mv717==.
replace non_agri_workforce=. if mv717==98

cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"


////Panel A: With Controls//

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv190  i.mv025 i.mv131 mv136 i.mv010  if mv104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel A.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv190   i.mv131 mv136 i.mv010  if mv104==95 & mv025==1 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv190   i.mv131 mv136 i.mv010 if mv104==95 & mv025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

////Panel B: Without Controls//
areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.mv010  if mv104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel B.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.mv010  if mv104==95 & mv025==1 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg member_workforce  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.mv010 if mv104==95 & mv025==2 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A14: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'





************Table A15: Effect of the Grants Policy on Fertility and Child Preference******
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.

gen ideal_no_boys=v627
gen ideal_no_girs=v628
for var ideal_no_boys ideal_no_girs: replace X=. if X==96
gen ideal_no_children=v614
replace ideal_no_children=. if ideal_no_children==7
gen son_preference=1 if ideal_no_boys> ideal_no_girs
replace son_preference=0 if son_preference==.
replace son_preference=. if ideal_no_boys==.
gen knows_mod_method_contr=v301
replace knows_mod_method_contr=0 if v301<3
replace knows_mod_method_contr=1 if knows_mod_method_contr==3

gen use_mod_method_contra=v364
replace use_mod_method_contra=0 if use_mod_method_contra!=1
replace use_mod_method_contra=. if v364==5
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"

areg v201  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v501!=0 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg v218  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v501!=0  & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg ideal_no_children  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010  if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg son_preference  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg knows_mod_method_contr  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg use_mod_method_contra  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v501!=0 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel A.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'


//Panel B: Without Socio-economic Controls//
areg v201  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v501!=0 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", replace addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg v218  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v501!=0  & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg ideal_no_children  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010  if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg son_preference  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg knows_mod_method_contr  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104==95  , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

areg use_mod_method_contra  c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v501!=0 & v104==95 , absorb(sdistri) cluster(sdistri)
test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)
test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)
outreg2 using "Table A15: Panel B.xls", append addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'




*********Table A16: Effect of the Grants Policy on Educational Attainment of Girls (Who did not always stayed at the same place)***************
use "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data\NHFS data.dta", clear
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Data"
sort districtcode
save,replace
merge districtcode using treatment_neighbor_control.dta


gen post=1 if v010>1990 & v010<.
replace post=0 if v010<=1990

gen full_trend=(v010-1965) 
gen post_trend=(v010-1990) if post==1
for var full_trend post_trend:replace X=0 if X==.
tab v106, gen(dum)
gen finished_college=1 if v133>=15 & v133<.
replace finished_college=0 if finished_college==.
gen num_years_in_college=v133 if dum4==1
replace num_years_in_college= num_years_in_college-12
replace num_years_in_college=0 if num_years_in_college==.


//Panel A: With Socio-economic Controls
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post  i.v190  i.v140 i.v131 v136 i.v010 if v010<=1998 & v104!=95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A16: Panel A.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}


//Panel B: Without Socio-economic Controls
cd "C:\Users\Amzad\Dropbox\College Construction\Replication-file-JHR\Results"
local append replace

foreach var of varlist v133 dum2 dum3 dum4 finished_college num_years_in_college{ //vars

areg `var' c.full_trend#c.treatment c.post_trend#c.treatment c.treatment#c.post   i.v010 if v010<=1998 & v104!=95 , absorb(sdistri) cluster(sdistri)


test c.full_trend#c.treatment=-(c.post_trend#c.treatment)
local fstat1=r(F)
local fsig1=r(p)

test c.full_trend#c.treatment c.post_trend#c.treatment
local fstat2=r(F)
local fsig2=r(p)

outreg2 using "Table A16: Panel B.xls",  addstat("F-stat 1", `fstat1', "Sig. level", `fsig1', "F-stat 2", `fstat2', "Sig. level", `fsig2') `append'

local append append
}

